Create a bytearray from a ListΒΆ
Create a bytearray from a list.
L = [10, 20, 56, 35, 17, 99]
# Create bytearray from list of integers
BA = bytearray(L)
for x in BA:
print(x)
Output:
10
20
56
35
17
99
L = [10, 20, 56, 35, 17, 99]
# Create bytearray from list of integers
BA = bytearray(L)
for x in BA:
print(x)
Output:
10
20
56
35
17
99